
# str.split() 方法拆分字符串
curdate = '2022/11/4'
mylist = curdate.split('/')
print(mylist)  # ['2022', '11', '4']
# 用 '-' 将 mylist日期合并为字符串 '2022-11-4'
new_date = '-'.join(mylist)
print(new_date)


